﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UsrConfig.ascx.cs" Inherits="HCFramework.AdminTool.ConfigManage.UsrConfig" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<div class="groupHeader">
    Configuration
</div>
<asp:Panel ID="PanelGrid" runat="server">
    Name: 
    <asp:TextBox ID="txtFilterByName" runat="server"></asp:TextBox>
    <asp:Button ID="btnFilter" runat="server" Text="Filter" />
    <telerik:RadGrid ID="RadGridMain" runat="server" Skin="Office2007" 
        AutoGenerateColumns="False" ShowFooter="True" AllowPaging="True" AllowSorting="True"
        GridLines="None" AllowMultiRowSelection="True" OnPreRender="RadGridMain_PreRender"
        OnItemDataBound="RadGridMain_ItemDataBound" 
        onitemcommand="RadGridMain_ItemCommand" >
        <ClientSettings>
        </ClientSettings>
        <MasterTableView NoMasterRecordsText="No records.">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="ConfigID" UniqueName="ConfigID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn HeaderText="Name" UniqueName="Name">
                    <FooterTemplate>
                        <asp:DropDownList ID="cboName" runat="server">
                        </asp:DropDownList>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Literal ID="litName" runat="server" Text='<%#Eval("Name")%>'></asp:Literal></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Value" UniqueName="Value">
                    <FooterTemplate>
                        <asp:TextBox ID="txtValue" runat="server" Width="100%"></asp:TextBox></FooterTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="txtValue" runat="server" Width="100%" Text='<%#Eval("Value")%>'></asp:TextBox></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="" UniqueName="Action">
                    <FooterTemplate>
                        <asp:Button ID="btnAddNew" runat="server" Text="Insert" CommandName="Them"></asp:Button></FooterTemplate>
                    <ItemTemplate>
                        <asp:Button ID="btnUpdate" runat="server" Text="Update" CommandArgument='<%#Eval("ConfigID") %>'
                            CommandName="Sua"></asp:Button>
                        <asp:Button ID="btnDelete" runat="server" Text="Delete" CommandArgument='<%#Eval("ConfigID") %>'
                            CommandName="Xoa" OnClientClick="return confirm('Are you sure?');">
                        </asp:Button>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView></telerik:RadGrid>
</asp:Panel>
